EXEC=main

CC=gcc
CFLAGS=
LDFLAGS=-lpcap
OPTIONS=-DDEBUG -g


all: $(EXEC)

%.o: %.c
	@echo "-- Compilation \t: " $@
	@$(CC) -o $@ -c $< $(CFLAGS) $(OPTIONS)

$(EXEC): main.o
	@echo "-- Link " $@ "\t:" $^
	@$(CC) -o $(EXEC) $^ $(LDFLAGS)

clean:
	@rm -f $(EXEC) *.o
